Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert 97dc86b and fix #607 #608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephematician
Copy link
Contributor

@stephematician stephematician commented Dec 13, 2024

Restore FIFO management of dev->outbuf_list; fixes #607.

A bug was introduced in 97dc86b where the tail of dev->outbuf_list was being used as the return value of DQBUF for an output application; this meant that the most-recently queued buffer was being used even if it hadn't been read or was in the process of being read by a capture application (potential for 'tearing'). Further more, by adding the buffer back to the tail - none of the other buffers were ever used.

Revert to FIFO management of dev->outbuf_list
@stephematician
Copy link
Contributor Author

I'm assuming that this doesn't change (expected) behaviour for readers; i.e. that they'll read from the most-recently queued buffer as it comes available. From what I understand, this should be the case.

@stephematician
Copy link
Contributor Author

Ah, I found the original issue: #116 - I'll test that this hasn't caused a reversion.

@stephematician
Copy link
Contributor Author

stephematician commented Dec 13, 2024

Tested with a Logitech C270 webcam connected to /dev/video0 and:

user@home:~$ sudo modprobe v4l2loopback max_buffers=4 video_nr=2
user@home:~$ gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg, width=1280, height=720, framerate=30/1 ! v4l2sink device=/dev/video2

Did not fail.

@stephematician
Copy link
Contributor Author

Should also fix #191.

@umlaeute
Copy link
Owner

thx. i'll try to find time to look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Our producer is always getting the same (shared mem) buffer and so does the example producer
2 participants